/*****************************************************************************\

File:   otkExamplesMain.java


Date          Build     Author        Version   Comments
08-Aug-12    P-20-11    aphatak       $$1       Created
03-Sep-12    P-20-13    asonar        $$2       Updated
18-Sep-12    P-20-14    asonar        $$3       Updated
19-Sep-12    P-20-14    dshah         $$4       Updated
12-Oct-12    P-20-14    dshah         $$5       Updated
30-Oct-12    P-20-16    dshah         $$6       Updated
01-Nov-12    P-20-16    dshah         $$7       Updated
14-Dec-12    P-20-19    asonar        $$8       Updated
29-May-14    P-20-54    rkothari      $$9      Added addUIFCExample
20-mar-15 P-30-05 gshmelev $$10  called GetCurrentSession
31-Mar-15  P-30-05 gshmelev  $$11 called GetCurrentSessionWithCompatibility
\****************************************************************************/
package com.mf.pte;


import com.ptc.cipjava.*;
import com.ptc.pfc.pfcGlobal.*;
import com.ptc.pfc.pfcSession.*;
import com.ptc.pfc.pfcCommand.*;
import com.ptc.pfc.pfcModel.*;
import com.ptc.pfc.pfcSolid.*;
import com.ptc.wfc.wfcSession.*;
import com.ptc.wfc.wfcDisplay.*;

import java.util.*;
import java.io.*;

/* The OTK Java Examples Main Class */
public class otkExamplesMain {

   public static void start ()
    {
	   new otkExamplesMain ();
    }
  
   public static void stop ()
    {
    }


   public otkExamplesMain ()
   {
		SetupRibbonCommands();
   }

   private Session session;
   private WSession wSession;

   private static final String ribbonFile = "otkJavaExamples.rbn";
   private static final String msgFile = "otkjavamessage.txt";
   /* Load the OTK Java Examples Ribbon & add Example commands */
   private void SetupRibbonCommands()
   {
		try
		{
			session = pfcSession.GetCurrentSessionWithCompatibility (CreoCompatibility.C4Compatible);
			wSession = (WSession)session;

			wSession.RibbonDefinitionfileLoad(ribbonFile);

		}
		catch (Throwable e)
	    {
		  System.out.println ("Exception caught: "+e);
		  e.printStackTrace ();
	    }
    }


}
